<?php

include_once(__DIR__.'/Dumper/DumperInterface.php');
include_once(__DIR__.'/Dumper/PHPDumper.php');
include_once(__DIR__.'/Exception/Exception.php');

include_once(__DIR__.'/Filter/FilterInterface.php');
include_once(__DIR__.'/Filter/CDATAFilter.php');
include_once(__DIR__.'/Filter/CSSFilter.php');
include_once(__DIR__.'/Filter/JavaScriptFilter.php');
include_once(__DIR__.'/Filter/PHPFilter.php');

include_once(__DIR__.'/Lexer/LexerInterface.php');
include_once(__DIR__.'/Lexer/Lexer.php');

include_once(__DIR__.'/Node/Node.php');
include_once(__DIR__.'/Node/BlockNode.php');
include_once(__DIR__.'/Node/CodeNode.php');
include_once(__DIR__.'/Node/CommentNode.php');
include_once(__DIR__.'/Node/DoctypeNode.php');
include_once(__DIR__.'/Node/FilterNode.php');
include_once(__DIR__.'/Node/TagNode.php');
include_once(__DIR__.'/Node/TextNode.php');

include_once(__DIR__.'/Visitor/VisitorInterface.php');
include_once(__DIR__.'/Visitor/AutotagsVisitor.php');




$template="";
$dumper = new PHPDumper();
$dumper->registerVisitor('tag', new AutotagsVisitor());
$dumper->registerFilter('javascript', new JavaScriptFilter());
$dumper->registerFilter('cdata', new CDATAFilter());
$dumper->registerFilter('php', new PHPFilter());
$dumper->registerFilter('style', new CSSFilter());

// Initialize parser & Jade
$parser = new Parser(new Lexer());
$jade   = new Jade($parser, $dumper);

// Parse a template (both string & file containers)
echo $jade->render($template);